package org.steven.crm.app.api;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class AppKeys {
	public static String SUPPLIER_ID_COLUMN = "lastVistSupplierId";
	public static String SITE_NAME = "";
	public static String AJAX_RESULT = "AJAX_RESULT";
	public static String ORDER_SQL = "ORDER_SQL";
	public static String UPLOAD_FILE_PATH = "";
	public static String DOMAIN_ADMIND = "";
	public static String DOMAIN_API = "";
	public static String DOMAIN_MOBILE = "";
	public static String DOMAIN_IMAGE = "";
	public static String DOMAIN_RS = "";

	public static String WX_APPID = "";
	public static String WX_APPSECRET = "";
	
	public static final String API_PRIVATE_KEY = "89LDJKDY#$%";
	
	public static String META_TITLE = "META_TITLE";
	public static String META_KEYWORDS = "META_KEYWORDS";
	public static String META_DESCRIPTION = "META_DESCRIPTION";
	
	public static int IMAGE_SIZE_LARGE = 400;
	public static int IMAGE_SIZE_MIDDEN = 200;
	public static int IMAGE_SIZE_LIST = 250;
	public static int SKU_IMAGE_SIZE_SMALL = 60;
	
	public static int SYSTEMUSER_IMAGE_SIZE = 100;

	public static int SHOP_IMAGE_SIZE = 100;

	public static int IFNO_IMAGE_SIZE = 200;
	
	public static String ORDER_STATUS_UNPAY = "10";
	public static String ORDER_STATUS_WAITAUDIT = "20";
	public static String ORDER_STATUS_DAIPEIHUO = "30";
	public static String ORDER_STATUS_DAIFAHUO = "40";
	public static String ORDER_STATUS_WAITZT = "50";
	public static String ORDER_STATUS_DAISHOUHUO = "60";
	public static String ORDER_STATUS_YIQIANSHOU = "70";
	public static String ORDER_STATUS_SUCCEED = "80";
	public static String ORDER_STATUS_CLOSE = "90";
	
	public static String PAY_TYPE_ID_WEIXIN_APP = "25";
	public static String PAY_TYPE_ID_QQ_APP = "28";
	
	public static String SMS_REGISTER_CODE_TEMPID = "SMS_99115006";
	public static String SMS_TAKEBACK_PWD_CODE_TEMPID = "SMS_99115006";
	public static String SMS_CHANGE_MOBILE_CODE_TEMPID = "SMS_99115006";
	public static String SMS_FAHUO_TEMPID = "SMS_119915584";


	public static void setSysConfig(Map<String, String> sysConfigHash) {
		SITE_NAME = sysConfigHash.get("websiteName");
		DOMAIN_ADMIND = sysConfigHash.get("adminDomain");
		DOMAIN_API = sysConfigHash.get("apiDomain");
		DOMAIN_MOBILE = sysConfigHash.get("mobileDomain");
		DOMAIN_IMAGE = sysConfigHash.get("imageDomain");
		DOMAIN_RS = sysConfigHash.get("rsDomain");
		UPLOAD_FILE_PATH = sysConfigHash.get("uploadDir");
		WX_APPID = sysConfigHash.get("wxAppId");
		WX_APPSECRET = sysConfigHash.get("wxAppSecret");
	}

	public static void main(String[] args) {
		int num = 5;

		int prev = 0;
		int cur = 1;
		for(int i = 1; i <= num ; ++i){
			int tmp = cur;
			cur += prev;
			prev = tmp;
		}

		System.out.println(cur);


		int maxTwos = num / 2;

		List<List<Integer>> list = new ArrayList<>();

		List<Integer> allOneList = new ArrayList<>();
		for (int i = 0; i < num; ++i) {
			allOneList.add(1);
		}
		list.add(allOneList);

		for (int i = 1; i <= maxTwos; ++i) {
			List<Integer> innerList = new ArrayList<>();
			num = 9;
			for (int j = 0; j < i; ++j) {
				innerList.add(2);
			}
			for (int j = 0; j < (num - i * 2); ++j) {
				innerList.add(1);
			}
			list.addAll(getCombination(innerList, i));
		}

		System.out.println(list.size());

		for (List<Integer> innerList : list) {
			System.out.println(innerList);
		}
	}

	private static List<List<Integer>> getCombination(List<Integer> innerList, int numTwos) {
		List<List<Integer>> list = new ArrayList<>();
		list.add(innerList);

		return list;
	}
}
